<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/12/11
  Time: 9:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <center>
        <form action="saveDeptRole.do" method="post">
        <table border="1" rules="all">
            <tr align="center">
                <td colspan="100">
                    <h1>正在给${db.dname}部门选择角色</h1>
                </td>
            </tr>

            <tr align="center" bgcolor="#ffc0cb">
                <td>
                    <input type="checkbox"/>
                </td>
                <th>角色编号<input type="hidden" name="deptid" value="${db.deptid}"/></th>
                <th>角色名称</th>
            </tr>
            <c:forEach items="${list}" var="r">
                <tr align="center">
                    <td>

                        <input type="checkbox" name="rids" value="${r.rid}" <c:forEach var="rr" items="${rids}">${rr==r.rid?'checked':''}</c:forEach>/>
                    </td>
                    <td>${r.rid}</td>
                    <td>${r.rname}</td>
                </tr>
            </c:forEach>
            <tr align="center">
                <td colspan="100">
                    <input type="submit" value="保存">
                </td>
            </tr>
        </table>
        </form>
    </center>
</body>
</html>
